package cn.share.life.system.util.excelMath;

import lombok.Data;

import java.io.Serializable;

@Data
public class MathResultZeroEntity extends MathResultEntity implements Serializable {

    public double getCashOutflow() {
        return getCapitalInvestment() + getSalesTaxesAndSurcharges() + getOperatingCosts() +
                getPrincipalRepayment() + getInterestPayment() + getIncomeTax() + getEmployeeWelfareFund() + getOtherExpenses();
    }
    //    资本金投入
    public double getCapitalInvestment() {
        return getBaseEntity().getCapital();
    }

    //    利润总额
    public double getTotalProfit() {
        return getSalesRevenue() - getSalesTaxesAndSurcharges() - getOperatingCosts() - getDepreciationExpense() - getInterestPayment();
    }
    //    净现金流量
    public double getNetCashFlow() {
        return getCashInflow() - getCashOutflow();
    }
    //    累计净现金流量
    public double getCumulativeNetCashFlow() {
        return getNetCashFlow();
    }

    //    净现金流量现值
    public double getNetPresentValue() {
        return getNetCashFlow();
    }
    //    累计净现金流量现值
    public double getCumulativeNetPresentValue() {
        return getNetPresentValue();
    }
}
